<?php
/**
 * Created by PhpStorm.
 * User: fire
 * Date: 2018/10/19
 * Time: 11:12
 */

namespace App\Inspections;


class KeyHeldDowm
{
    public function detect($body)
    {
        if(preg_match('/(.)\\1{4,}/',$body)){

            throw new \Exception('Your reply contains spam');

        }
    }

}